package org.example.mapper;

import org.apache.ibatis.annotations.Param;
import org.example.entity.Note;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;
import java.util.Map;

/**
* @author 谢娅
* @description 针对表【note】的数据库操作Mapper
* @createDate 2023-12-21 23:25:23
* @Entity org.example.entity.Note
*/
public interface NoteMapper extends BaseMapper<Note> {

    List<Note> getDimQuery(@Param("dataMap")Map<String, Object> dataMap);

    Note selectCurrentNote(Long userId);

    int updateByMap(Map<String, Object> dataMap);

    int updateEditable(@Param("noteId") Long noteId, @Param("editable") Integer editable);

    List<Note> search(String keyword, String startTime, String endTime, String categoryId, Long userId);

    List<Note> listByUserId(Long userId);

    List<Note> listByParentFolderId(Long userId, Long parentFolderId);
}




